<?php

namespace backend\modules\home\models;

use Yii;

/**
 * This is the model class for table "mh_banner".
 *
 * @property int $id
 * @property int $cid
 * @property string $title
 * @property string $subtitle
 * @property string $img_path
 * @property string $url
 * @property int $sort
 * @property int $create_time
 */
class Banner extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'mh_banner';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['create_time'], 'integer'],
            [['cid'], 'string', 'max' => 1],
            [['title', 'subtitle', 'img_path', 'url'], 'string', 'max' => 255],
            [['sort'], 'string', 'max' => 3],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'cid' => 'Cid',
            'title' => 'Title',
            'subtitle' => 'Subtitle',
            'img_path' => 'Img Path',
            'url' => 'Url',
            'sort' => 'Sort',
            'create_time' => 'Create Time',
        ];
    }
}
